<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp" %>
<fmt:message key="menu_meeting_label1" var="menu_meeting_label1"/>
<fmt:message key="menu_meeting_label2" var="menu_meeting_label2"/>
<fmt:message key="menu_meeting_label3" var="menu_meeting_label3"/>
<fmt:message key="menu_meeting_label4" var="menu_meeting_label4"/>
<fmt:message key="menu_meeting_label5" var="menu_meeting_label5"/>
<fmt:message key="menu_meeting_label6" var="menu_meeting_label6"/>
<fmt:message key="menu_meeting_label7" var="menu_meeting_label7"/>
<fmt:message key="menu_meeting_label8" var="menu_meeting_label8"/>
<fmt:message key="menu_meeting_label9" var="menu_meeting_label9"/>
<fmt:message key="menu_meeting_label10" var="menu_meeting_label10"/>
<fmt:message key="menu_meeting_label11" var="menu_meeting_label11"/>
<fmt:message key="menu_meeting_label12" var="menu_meeting_label12"/>
<fmt:message key="menu_meeting_label13" var="menu_meeting_label13"/>
<fmt:message key="menu_meeting_label14" var="menu_meeting_label14"/>
<fmt:message key="menu_meeting_label15" var="menu_meeting_label15"/>
<fmt:message key="menu_meeting_label16" var="menu_meeting_label16"/>
<fmt:message key="day_label19" var="day_label19"/>
<fmt:message key="day_label20" var="day_label20"/>
<fmt:message key="day_label21" var="day_label21"/>

<Br>
<c:if test="${!empty calendarsMeeting}">
<TABLE class=leftColumnModuleHead cellSpacing=0 cellPadding=0 
  width="100%" border=0>
  <TBODY>
  <TR>
    <TH class="menu_title_left" width=48>&nbsp;</TH>
      <TH class="menu_title_middle">${day_label19}</TH>
    <th width="48" align="right" class="menu_title_right"></th></TR></TBODY></TABLE>
<TABLE class=subMenu cellSpacing=1 cellPadding=0 width="100%" border=0>
  <TBODY>	
			<%
			     int i=0;
			%>
		<c:choose> 
		 <c:when test="${sessionScope.calendarsMeeting == null}">
		     <TR>			    
				 <TD colspan="7">
				 <table width="100%" border="0" cellspacing="0" cellpadding="0">
				  <tr>
				  	<c:set var="pmonth" value="${calendarMeetingInfo.currentMonth=='1'?'12':calendarMeetingInfo.priMonth}"/>
				  	<c:set var="pyear" value="${calendarMeetingInfo.currentMonth=='1'?calendarMeetingInfo.priYear:calendarMeetingInfo.currentYear}"/>
				  	
					<td><a href="<c:url value="/modules/meeting/meetingRooms.do?method=showCalendarDayInfo&year=${pyear}&month=${pmonth}&day=${calendarMeetingInfo.currentDay}&op=priMonth&show=day"/>" border="0"><img src="../../themes/${sessionScope.loginUser.theme}/images/calendar_previous.gif" title="${menu_meeting_label2}" border="0"/></a></td>
					<td  class="monthHeaderH3" align="center">${calendarMeetingInfo.currentYear}${menu_meeting_label3}${calendarMeetingInfo.currentMonth}${menu_meeting_label4}</td>
					<c:set var="nmonth" value="${calendarMeetingInfo.currentMonth==12?'1':calendarMeetingInfo.nextMonth}"/>
				  	<c:set var="nyear" value="${calendarMeetingInfo.currentMonth==12?calendarMeetingInfo.nextYear:calendarMeetingInfo.currentYear}"/>
				  	
					<td><a href="<c:url value="/modules/meeting/meetingRooms.do?method=showCalendarDayInfo&year=${nyear}&month=${nmonth}&day=${calendarMeetingInfo.currentDay}&op=neMonth&show=day"/>" border="0"><img src="../../themes/${sessionScope.loginUser.theme}/images/calendar_next.gif" title="${menu_meeting_label5}" border="0"/></a></td>
				  </tr>
				</table>
				</TD>
				</tr>		
				<tr>
				   <TD height="20" align="center" class="monthCalBodyTHDay">${menu_meeting_label6}</TD>
	   			   <TD class="monthCalBodyTHDay" align="center">${menu_meeting_label7}</TD><TD class="monthCalBodyTHDay" align="center">${menu_meeting_label8}</TD><TD class="monthCalBodyTHDay" align="center">${menu_meeting_label9}</TD><TD class="monthCalBodyTHDay" align="center">${menu_meeting_label10}</TD><TD class="monthCalBodyTHDay" align="center">${menu_meeting_label11}</TD><TD class="monthCalBodyTHDay" align="center">${menu_meeting_label12}</TD>
				</tr>
				 <c:forEach var="calendars" items="${calendarsMeeting}"  >   
			 	    <TD align="center"  height="20"<c:if test="${fn:contains(calendars.flag,'P') || fn:contains(calendars.flag,'N')}"> bgcolor="#ffffff" color="#999999" align="center" </c:if> <c:if test="${fn:contains(calendars.selectDay,'1')}"> class="daycurrent"</c:if>>
			 	    	<A class=subMenuLink href="<c:url value="/modules/meeting/meetingRooms.do?method=showCalendarDayInfo&year=${calendars.year}&month=${calendars.month}&day=${calendars.day}&show=day"/>" 
			 	    	<c:choose>  
			 	    		<c:when test="${fn:contains(calendars.titleCount,'0')}"> 
			 	    			title="${day_label20}" 
			 	    		</c:when>
			 	    		<c:otherwise> 
			 	    			title="${menu_meeting_label14}${calendars.titleCount}${day_label21}   ${menu_meeting_label16}${calendars.title}"
			 	    		</c:otherwise>
			 	    	</c:choose> >
			 	    		<c:choose>  
			 	    			<c:when test="${fn:contains(calendars.selectDay,'1')}"> 
			 	    				<font color="#FF0000">${calendars.name}</font>
			 	    			</c:when> 
			 	    			<c:otherwise>
			 	    				${calendars.name}
				  				</c:otherwise>
				  			</c:choose>
				  			<c:choose>
				  				<c:when test="${fn:contains(calendars.titleCount,'0')}">  
				  				</c:when>
				  				<c:otherwise>  
				  				</c:otherwise>
				  			</c:choose> 
				  		</A>
				  </TD>      
				<%  
				    i++;  
				   if(i%7==0){
				   %>    
				   <tr></tr>
				   <%
				   }
				%>   	   
				</c:forEach>					
		   </TR>
      </c:when>
      <c:otherwise> 
      		<TR>			    
				 <TD colspan="7">
				 <table width="100%" border="0" cellspacing="0" cellpadding="0">
				  <tr>
				  	<c:set var="pmonth" value="${sessionScope.calendarMeetingInfo.currentMonth==1?'12':sessionScope.calendarMeetingInfo.priMonth}"/>
				  	<c:set var="pyear" value="${sessionScope.calendarMeetingInfo.currentMonth==1?sessionScope.calendarMeetingInfo.priYear:sessionScope.calendarMeetingInfo.currentYear}"/>
				  	
					<td><a href="<c:url value="/modules/meeting/meetingRooms.do?method=showCalendarDayInfo&year=${pyear}&month=${pmonth}&day=${sessionScope.calendarMeetingInfo.currentDay}&op=priMonth&show=day"/>" border="0"><img src="../../themes/${sessionScope.loginUser.theme}/images/calendar_previous.gif" title="${menu_meeting_label2}" border="0"/></a></td>
					<td  class="monthHeaderH3" align="center">${sessionScope.calendarMeetingInfo.currentYear}${menu_meeting_label3}${sessionScope.calendarMeetingInfo.currentMonth}${menu_meeting_label4}</td>
					<c:set var="nmonth" value="${sessionScope.calendarMeetingInfo.currentMonth==12?'1':sessionScope.calendarMeetingInfo.nextMonth}"/>
				  	<c:set var="nyear" value="${sessionScope.calendarMeetingInfo.currentMonth==12?sessionScope.calendarMeetingInfo.nextYear:sessionScope.calendarMeetingInfo.currentYear}"/>
				  	
					<td><a href="<c:url value="/modules/meeting/meetingRooms.do?method=showCalendarDayInfo&year=${nyear}&month=${nmonth}&day=${sessionScope.calendarMeetingInfo.currentDay}&op=neMonth&show=day"/>" border="0"><img src="../../themes/${sessionScope.loginUser.theme}/images/calendar_next.gif" title="${menu_meeting_label5}" border="0"/></a></td>
				  </tr>
				</table>
				</td>
				</tr>
				<tr>
				   <TD height="20" align="center" class="monthCalBodyTHDay">${menu_meeting_label6}</TD>
	   			   <TD class="monthCalBodyTHDay" align="center">${menu_meeting_label7}</TD><TD class="monthCalBodyTHDay" align="center">${menu_meeting_label8}</TD><TD class="monthCalBodyTHDay" align="center">${menu_meeting_label9}</TD><TD class="monthCalBodyTHDay" align="center">${menu_meeting_label10}</TD><TD class="monthCalBodyTHDay" align="center">${menu_meeting_label11}</TD><TD class="monthCalBodyTHDay" align="center">${menu_meeting_label12}</TD>
				</tr>
				 <c:forEach var="calendars" items="${sessionScope.calendarsMeeting}"  >   
			 	    <TD align="center"  height="20"<c:if test="${fn:contains(calendars.flag,'P') || fn:contains(calendars.flag,'N')}"> bgcolor="#ffffff" color="#999999" align="center" </c:if> <c:if test="${fn:contains(calendars.selectDay,'1')}"> class="daycurrent"</c:if>><A class=subMenuLink 
			      href="<c:url value="/modules/meeting/meetingRooms.do?method=showCalendarDayInfo&year=${calendars.year}&month=${calendars.month}&day=${calendars.day}&show=day"/>" <c:choose>  <c:when test="${fn:contains(calendars.titleCount,'0')}"> title="${menu_meeting_label13}" </c:when><c:otherwise> title="${menu_meeting_label14}${calendars.titleCount}${menu_meeting_label15}   ${menu_meeting_label16}${calendars.title}"</c:otherwise></c:choose> ><c:choose>  <c:when test="${fn:contains(calendars.selectDay,'1')}"> <font color="#FF0000">${calendars.name}</font></c:when> <c:otherwise>${calendars.name}
				  </c:otherwise></c:choose><c:choose><c:when test="${fn:contains(calendars.titleCount,'0')}"> </c:when><c:otherwise> </c:otherwise></c:choose> </A></TD>      
				<%  
				    i++;  
				   if(i%7==0){
				   %>    
				   <tr></tr>
				   <%
				   }
				%>   	   
				</c:forEach>					
		   </TR>
      </c:otherwise> 
     </c:choose>
	</TBODY>
</TABLE>
</c:if>